﻿using BarManager.Core.BusinessRules.Interfaces.Validator;
using BarManager.Core.BusinessRules.Specification;
using BarManager.Core.DomainService;
using BarManager.Core.Entity;

namespace BarManager.Core.BusinessRules.Validator
{
    public class ZonaValidator : BaseValidator<Zona>, IZonaValidator
    {
        public ZonaValidator(IZonaRepository repository)
        {
            Rules.Add(new Rule<Zona>(ValidatorType.Add, new ZonaAddSpecification(repository)));
            Rules.Add(new Rule<Zona>(ValidatorType.Update, new ZonaAddSpecification(repository)));    
        }
    }
}
